#ifndef INCLUDE_MAIL_BOX_
#define INCLUDE_MAIL_BOX_

#include <mthread.h>

#define MAX_MBOX_LENGTH (64)
#define BOXS 40

// TODO: please define mailbox_t;
// mailbox_t is just an id of kernel's mail box.
typedef int mailbox_t;
typedef struct mailbox{
    int count;
    char name[200];
    mthread_mutex_t lock;
    mthread_cond_t empty;
    mthread_cond_t full;
}box_t;

mailbox_t mbox_open(char *);
void mbox_close(mailbox_t);
void mbox_send(mailbox_t, void *, int);
void mbox_recv(mailbox_t, void *, int);

#endif
